#ifndef DoubleNode_h
#define DoubleNode_h

namespace TL {
    template<class T> class DoubleNode {
    private:
        T m_Data;
        DoubleNode *m_Next, *m_Prev;

    public:
        DoubleNode()
        {
            m_Data = T();

            m_Next = 0;
            m_Prev = 0;
        }
        DoubleNode(const T &data)
        {
            m_Data = data;

            m_Next = 0;
            m_Prev = 0;
        }
        DoubleNode(const T &data, DoubleNode *next_node, DoubleNode *prev_node)
        {
            m_Data = data;

            m_Next = next_node;
            m_Prev = prev_node;
        }

        T &GetData()
        {
            return m_Data;
        }
        const T &GetData() const
        {
            return m_Data;
        }
        DoubleNode *GetNext() const
        {
            return m_Next;
        }
        DoubleNode *GetPrev() const
        {
            return m_Prev;
        }
        void SetData(const T &data)
        {
            m_Data = data;
        }
        void SetNext(DoubleNode *next_node)
        {
            m_Next = next_node;
        }
        void SetPrev(DoubleNode *prev_node)
        {
            m_Prev = prev_node;
        }
    };
}

#endif
